/*
 * Motor.h
 *
 *  Created on: Apr 20, 2010
 *      Author: Soheil Damangir
 */

#ifndef MOTOR_H_
#define MOTOR_H_
#include <string>
#include "Controller.h"

#include "rrcon.h"
#include "xtask.h"

using namespace std;

namespace Group5 {

class Motor: kthrobot::XTask {
public:
  Motor(const string& _name, int _index);
  void setSpeed(int _speed);
  int getSpeed();
  int getDist();
  void resetDist();
  virtual ~Motor();
private:
  PID_controller *pid;
  string name;
  int current_speed_signal;
  int index;
  int dead_band;
  kthrobot::Motor handler;
};

}

#endif /* MOTOR_H_ */
